<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    <div>第一个div</div>
    <div>第二个div</div>
  </body>
  <script>
    console.dir(document.nodeType);
    console.dir(document.nodeName);
    let divs = document.getElementsByTagName("div");
    let divs2 = document.querySelectorAll("div");
    console.dir(divs);
    console.dir(divs2);

    // [...divs].forEach((element) => {
    //   console.log(element);
    // });
    // const res = [1, 2, 3, 4];
  </script>
</html>
